home *** CD-ROM | disk | FTP | other *** search
/ ftp.mactech.com 2010 / ftp.mactech.com.tar / ftp.mactech.com / machack / Hacks97 / WarriorsProgress.sit / Warrior’s Progress / source code / Source / Libraries / Processes / ProcessLoop.h < prev    next >
Text File  |  1997-06-28  |  646b  |  35 lines

  1. // ProcessLoop.h
  2.  
  3. #ifndef ProcessLoop_h
  4. #define ProcessLoop_h
  5.  
  6. #ifndef Process_h
  7. #include "Process.h"
  8. #endif
  9. #ifndef Assert_h
  10. #include "Assert.h"
  11. #endif
  12.  
  13. class ProcessLoop
  14.   {
  15.     private:
  16.         Process process;
  17.         bool finished;
  18.         
  19.         static const ProcessSerialNumber noProcess;
  20.         
  21.     public:
  22.         ProcessLoop();
  23.         
  24.         bool Finished() const                    { return finished; }
  25.         bool Unfinished() const                    { return !finished; }
  26.         
  27.         void operator++();
  28.         void operator++( int )                    { operator++(); }
  29.         
  30.         const Process& operator*() const        { Assert( !finished ); return process; }
  31.         const Process *operator->() const    { Assert( !finished ); return &process; }
  32.   };
  33.  
  34. #endif
  35.